<template>
  <transition appear name="fade">
    <div class="prompt-box">{{ promptMessage }}</div>
  </transition>
</template>

<script>
export default {
  name: "PromptBox",
  props: {
    promptMessage: {
      type: String,
      default: "请稍等！",
    },
  },
};
</script>

<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
  transition: all 0.5s;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}
.prompt-box {
  position: fixed;
  bottom: 13%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  color: #eee;
  background-color: #666;
  z-index: 1;
}
</style>
